Skip to content

feat(common): make imagePullPolicy configurable#248

Closed
knobo wants to merge 1 commit intoentur:mainfrom
knobo:feat/configurable-image-pull-policy
Closed

feat(common): make imagePullPolicy configurable#248
knobo wants to merge 1 commit intoentur:mainfrom
knobo:feat/configurable-image-pull-policy

Conversation

@knobo
Copy link
Copy Markdown

@knobo knobo commented Apr 27, 2026

Background

When developing and testing applications locally using a Kubernetes cluster running in Docker (e.g. kind), images are typically loaded directly into the cluster using kind load docker-image rather than being pushed to a remote registry. In this workflow, Kubernetes should not attempt to pull the image from a registry — it should use the locally loaded image as-is.

Currently, imagePullPolicy is hardcoded to Always in the common chart, making this local development workflow impossible without workarounds.

Changes

  • Adds a global imagePullPolicy value that applies to all containers. Defaults to Always, so existing deployments are unaffected.
  • Adds a per-container pullPolicy field that overrides the global value for that specific container.

Usage

A typical local development setup with a values-local.yaml:

imagePullPolicy: Never

Combined with:

docker build -t my-app:local .
kind load docker-image my-app:local
helm upgrade --install myapp . -f values.yaml -f values-local.yaml

For multi-container pods where only one container uses a local image:

common:
  containers:
    - name: myapp
      image: my-app:local
      pullPolicy: Never
    - name: sidecar
      image: eu.gcr.io/entur/sidecar:1.0
      # uses global default (Always)

Compatibility

Fully backwards compatible — the default remains Always.

Adds support for overriding imagePullPolicy globally and per container.
Useful for local Kubernetes cluster testing (e.g. kind) where images
are loaded directly into the cluster and should not be pulled from a
remote registry.
@knobo knobo requested a review from a team as a code owner April 27, 2026 11:23
@knobo
Copy link
Copy Markdown
Author

knobo commented Apr 27, 2026

Bruker Kyverno med ClusterPolicy istede.

@knobo knobo closed this Apr 27, 2026
@knobo knobo deleted the feat/configurable-image-pull-policy branch April 27, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant